package de.schlinke_marius.database;

import android.database.Cursor;
import android.database.sqlite.SQLiteException;

public interface HardwaretoExamplesTbl {
	
	public static final String TABLE_NAME = "HARDWARETOEXAMPLES";
	
	public static final String COLUMN_FK_EXAMPLES = "FK_EXAMPLES_HTOOE";
	
	public static final String COLUMN_FK_HARDWARE = "FK_HARDWARE";
	
	public static final String[] COLUMNS = {
							COLUMN_FK_EXAMPLES,
							COLUMN_FK_HARDWARE};
	
	public static final String CREATE_TABLE_HARDWARETOEXAMPLES = "CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " ("
								+ COLUMN_FK_EXAMPLES + " INTEGER,"
								+ COLUMN_FK_HARDWARE + " INTEGER, FOREIGN KEY (FK_EXAMPLES_HTOOE) REFERENCES EXAMPLES (_ID)," +
								"FOREIGN KEY (FK_HARDWARE) REFERENCES HARDWARE (_ID) );";
	
	public static final String  INSERT_INTO_HARDWARETOEXAPLES = "INSERT INTO " + TABLE_NAME + "(" + COLUMN_FK_EXAMPLES + "," + COLUMN_FK_HARDWARE + ") values (?,?)";
	

	public long insertIntoHardwareToExamples(int fkExamples, int fkHardware) throws SQLiteException;
	
	public Cursor getHardwareToExamples(int id) throws SQLiteException;
	
}
